function acc = vel_s_traj_acc(jerk_value,t_jerk,t_ed,t_half_idle,t)
    %这里的传入参数都是按一半给的，另一半是对称的，比较好表达
    %仍然需要保证急动时间<一半的有效时间
    half = t_ed+t_half_idle;
    if(t_jerk > t_ed/2)
        sprintf("params invalid:acc:t_ed:%.1f <2*t_jerk:%.1f",t_ed,t_jerk);
        jerk_value = 0;
    end
%     acc = 0.*(t<0 | (t>=t_ed & t< half))+t*jerk_value.*(t>=0 & t< t_jerk) +t_jerk*jerk_value.*(t>= t_jerk & t<t_ed-t_jerk)+...
%         (t_ed-t)*jerk_value.*(t>= t_ed-t_jerk & t< t_ed)+((-1)*vel_s_traj_acc(jerk_value,t_jerk,t_ed,t_half_idle,2*half-t)).*(t>=half);
%     
    if(t>half)
        acc = ((-1)*vel_s_traj_acc(jerk_value,t_jerk,t_ed,t_half_idle,2*half-t));      
    else
        acc = 0.*(t<0 | (t>=t_ed & t<= half))+...
            t*jerk_value.*(t>=0 & t< t_jerk) +...
            t_jerk*jerk_value.*(t>= t_jerk & t<t_ed-t_jerk)+...
            (t_ed-t)*jerk_value.*(t>= t_ed-t_jerk & t< t_ed);
    end
end